home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 1
/
CU Amiga Magazine CD-ROM Special Edition (1995)(EMAP Images)(GB)[Issue 1995-11].iso
/
Aminet
/
comm
/
tcp
/
SLIPShuttle.lha
/
startnet
< prev
Wrap
AmigaDOS Script File
|
1995-04-15
|
3KB
|
114 lines
.key IP,HN/K,DEST/K,MASK/K,GW/K,USER/K,SRV/S,BOOTP/S,UMASK/K,S2CF/K,S2OPT/K,IFACE/K,DEBUG/S
.bra {
.ket }
; This is a standard starnet script. ***** You MUST set HN and USER *****
;
; AmiTCP/IP startnet script
;
; Copyright © 1994 AmiTCP/IP Group,
; NSDi - Network Solutions Development Inc., Finland
; All rights reserved.
;
; *NOTE* NORMALLY YOU SHOULD USE THE PROVIDED CONFIGURATION UTILITY
; *NOTE* TO CHANGE THE CONFIGURATION. IF YOU NEED TO CHANGE THE
; *NOTE* CONFIGURATION MANUALLY, RESTRICT ANY MODIFICATIONS TO THIS
; *NOTE* "DEF" SECTION.
;
; IP address if known, _nothing_ otherwise
.def IP
; Our full host name and aliases if known, _nothing_ otherwise
; (if this is set, the IP _must_ be set, too)
.def HN "foo.bar"
; The destination address, needed only if GW is not good destination
.def DEST
; netmask if known, _nothing_ otherwise
.def MASK 255.255.255.0
; IP address of the default gateway if known, _nothing_ otherwise
.def GW
; Default login name
.def USER
; User's file creation mask
.def UMASK 022
; "SRV" if servers are used, _nothing_ otherwise
.def SRV SRV
; "BOOTP" if bootstrap protocol is used, _nothing_ otherwise
.def BOOTP
; Interface name
.def IFACE cslip0
; Sana-II device configuration file, _nothing_ otherwise
.def S2CF cslip0.config
; Sana-II device configuration to be stored into the configuration file
.def S2OPT "serial.device 0 19200 0.0.0.0 MTU=1006 7WIRE EOFMODE"
;
; *NOTE* YOU SHOULD NOT NEED TO EDIT ANYTHING BELOW. IF YOU NEED TO ADD
; *NOTE* CONFIGURATIONS OF ADDITIONAL INTERFACES OR TO START UTILITIES,
; *NOTE* DO IT IN THE AmiTCP:db/User-Startnet.
;
; Set the failat level so that the errors can be handled by the script
FailAt 21
; Log in
echo
echo login: {USER}
AmiTCP:bin/login -f {USER}
AmiTCP:bin/umask {UMASK}
run AmiTCP:AmiTCP {DEBUG}
WaitForPort AMITCP
If NOT Warn
; Create Sana2 configuration file if used
If NOT X EQ "X{S2CF}"
; Assure that ENV:Sana2 exists
If NOT Exists ENV:Sana2
MakeDir ENV:Sana2
EndIf
; Create configuration file
Echo "{S2OPT}" >ENV:Sana2/{S2CF}
EndIf
; Do we need loopback?
If X EQ "X{SRV}"
Set LOOPBACK=""
Else
Set LOOPBACK="LOOPBACK"
EndIf
; Configure interface
AmiTCP:bin/bootpconfig {IFACE} IP {IP$*} DEST {DEST$*} MASK {MASK$*} GW {GW$*} $LOOPBACK {BOOTP} {DEBUG}
If NOT Warn
If NOT X EQ "X{HN}"
rx "address AMITCP; 'ADD HOST {IP} {HN}'"
Else
If NOT X EQ "X{DEBUG}"
echo "Quering Name Server for the host name..."
EndIf
EndIf
setenv HOSTNAME `AmiTCP:bin/hostname`
Assign TCP: Exists >NIL:
IF Warn
Mount TCP: from AmiTCP:devs/Inet-Mountlist
EndIf
; Start the internet `super server' if wanted
If NOT X EQ "X{SRV}"
If X EQ "X{DEBUG}"
Run <NIL: >NIL: AmiTCP:bin/inetd
Else
Run AmiTCP:bin/inetd {DEBUG}
EndIf
EndIf
;
; Configure any additional interfaces & start utilities in
; AmiTCP:db/User-Startnet
;
If Exists AmiTCP:db/User-Startnet
Execute AmiTCP:db/User-Startnet
EndIf
Else
Echo Interface {IFACE} configuration failed!
Echo Stopping AmiTCP
AmiTCP:bin/stopnet FLUSH
EndIf
Else
Echo AmiTCP couldn't be started!
EndIf
; EOF